package com.zheng.HomeWeark;

public class Test08 {
    public static void main(String[] args) {
        Person p= null;
        Person p1= null;
        Person p2= null;
        try {
            p = new Person("张三",100);
            p1 = new Person();
            p2 = new Person();
            p1.setLifeValue(55);
            p2.setLifeValue(-12);
        } catch (NoLifeValueException e) {
            System.out.println("生命值不能为负数");
        } finally {
            System.out.println(p);
            System.out.println(p1);
            System.out.println(p2);
        }


    }
}
